<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商品详情</title>
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath() %>/resources/css/pic.css">
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath() %>/resources/css/common/jquery-ui-1.10.4.custom.css">
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/common/jquery-1.10.2.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/common/jquery-ui-1.10.4.custom.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/Product.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/move.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/pic.js"></script>

</head>
<body>
<body style="background: #f8fafd">

	<%@include file="common/header.jsp"%>
<div id="centercontent">
	<div id="playimg" class="play">
		<ul class="big_pic">
			<div class="prev"></div>
			<div class="next"></div>

			<a class="mark_left" href="javascript:void()"></a>
			<a class="mark_right" href="javascript:void()"></a>

			<c:forTokens items="${product_detail.subImages }" delims="," var="subImage" varStatus="status">
				<c:choose>
				<c:when test="${status.first }">
					<li style="z-index: 1;"><img src=${subImage }>
				</c:when>
				<c:otherwise>
					<li><img src=${subImage }></li>
				</c:otherwise>	
				</c:choose>
				
			</c:forTokens>
			
		</ul>
		<div class="small_pic">
			<ul>
				<c:forTokens items="${product_detail.subImages }" delims="," var="subImage" varStatus="status">
				<c:choose>
				<c:when test="${status.first }">
					<li style="filter: 100; opacity: 1;"><img src="${subImage }"></li>
				</c:when>
				<c:otherwise>
					<li><img src="${subImage }"></li>
				</c:otherwise>	
				</c:choose> 
			</c:forTokens>
			</ul>
		</div>
	</div>
	<div class="pro_infor">
		<p>
		<h3><${product_detail.proName}>${product_detail.proDescription }</h3>
		</p>
		<p>
			价格：<span class="price">¥&nbsp;${product_detail.proPrice }</span>
		</p>
		<p>
			库存：<span class="stock">${product_detail.stock }</span>
		</p>

		<form name="add_infor">
			<p id="count">
				数量：<input class="countval" type="text" value="1" name="quantity"><input
					class="add" type="button" value="+" onclick="toadd()"><input
					class="min" type="button" value="-" onclick="tomin()">
			</p>
			<input type="hidden" name="product_id" value="${product_detail.id }">
			<!-- form方式get过去的参数要隐藏- -->
			<span class="date_center">日期:&nbsp;<input type="text"
				id="date" name="date" readonly="readonly" placeholder="请选择日期"></span>
			<input id="intocar" class="intocar" type="button" name="intocar"
				value="加入购物车"> 
		</form>
	</div>

	<!-- 	//这是弹窗部分 -->
	<div id="succ_add" class="succ_add"></div>
	<!-- 	//这是弹窗部分 -->

	<div class="detail">
		<div class="title">
			<a href="JavaScript:void()" onclick="showdetail()">产品详情</a>
			<a href="JavaScript:void()" onclick="food()">美食推荐</a>
			<a href="JavaScript:void()" onclick="route()">行程路线</a>	
			<a href="JavaScript:void()" onclick="comment()">用户评价</a>
			
		</div>
		<hr>
		<div class="content">
			<div class="pro_pic">
				${product_detail.detail }
			</div>
			<div class="commont" style="display: none">
					<a class="type active" onclick="showType('',this)">全部</a>
					<a class="type" onclick="showType(1,this)">好评</a>
					<a class="type" onclick="showType(2,this)">一般</a>
					<a class="type" onclick="showType(3,this)">差评</a>
				<div class="commentcontent"></div>
			</div>
			<div class="food"></div>
			<div class="route"></div>
		</div>
	</div>
</div>
	<%@include file="common/footer.jsp"%>


</body>
</body>
</html>